Information processing apparatus control method therefor and storage medium

ABSTRACT

An information processing apparatus to which an external device is attachable includes an initialization unit configured to, when the information processing apparatus is activated from a power-off state, execute initialization of the external device, and not to, when the information processing apparatus is returned from a power-saving state, execute the initialization of the external device.

CROSS REFERENCE TO RELATED APPLICATIONS

The present application is a continuation of U.S. patent applicationSer. No. 14/997366 filed Jan. 15, 2016 which is a continuation of U.S.patent application Ser. No. 13/925646, filed Jun. 24, 2013, now issuedas U.S. Pat. No. 9,628,392, the contents of which are incorporated byreference herein in their entirety. Further, the present applicationclaims the benefit of priority from Japanese Patent Application No.2012-144327 filed Jun. 27, 2012, which is also hereby incorporated byreference herein in its entirety.

BACKGROUND OF THE INVENTION Field of the Invention

The present invention relates to information processing apparatuses,control methods therefor, and storage media.

Description of the Related Art

In recent years, the starting time of an information processingapparatus has become longer and longer due to an increase in programs.

Under such circumstances, many information processing apparatuses employa suspending function to shorten the starting time. The suspendingfunction is a technique for increasing the speed of starting at the timeof returning from a power-saving mode by continuing the supply of powerto a memory during the power-saving mode to retain data (a suspendedstate) (Japanese Patent Application Laid-Open No. 2005-284491).

However, when a change (installation, removal, addition, replacement,etc.) is made to optional units of an information processing apparatuswhile the information processing apparatus is in the suspended state,the change may not be detected, so that the information processingapparatus cannot operate normally.

The foregoing occurs because the optional units are not initialized atthe time of resume processing returning from the suspended state and,therefore, the change made to the optional units during the suspendedstate cannot be reflected.

SUMMARY OF THE INVENTION

The present invention is directed to an information processing apparatuscapable of operating normally even when a change is made to optionalunits of the information processing apparatus while the informationprocessing apparatus is in the suspended state.

According to an aspect of the present invention, an informationprocessing apparatus to which an external device is attachable includesan initialization unit configured to, when the information processingapparatus is activated from a power-off state, execute initialization ofthe external device, and not to, when the information processingapparatus is returned from a power-saving state, execute theinitialization of the external device.

Further features of the present invention will become apparent from thefollowing description of exemplary embodiments with reference to theattached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram illustrating a configuration of an imageforming apparatus.

FIG. 2 is a block diagram illustrating a configuration of a controllerunit.

FIG. 3 is a state transition diagram illustrating power states of theimage forming apparatus.

FIG. 4 is a flow chart illustrating an operation at the time when apower switch of the image forming apparatus is turned on.

FIG. 5 is a flow chart illustrating activation processing from apower-off state.

FIG. 6 is a flow chart illustrating activation processing from asuspended state.

FIG. 7 is a flow chart illustrating an operation at the time when thepower switch of the image forming apparatus is turned off.

FIG. 8 is a flow chart illustrating shift processing to the power-offstate.

FIG. 9 is a flow chart illustrating shift processing to the suspendedstate.

DESCRIPTION OF THE EMBODIMENTS

Exemplary embodiments of the present invention will be described indetail below with reference to the drawings.

Although the following describes an image forming apparatus such as aprinter, the exemplary embodiments of the present invention are alsoapplicable to an ordinary information processing apparatus such as apersonal computer (PC). Furthermore, although the following describes areader unit and a printer unit as optional units, the optional unitsaccording to the exemplary embodiment of the present invention are alsoapplicable to ordinary optional devices of an information processingapparatus such as an external storage device.

The following describes a first exemplary embodiment. FIG. 1 is a blockdiagram illustrating a configuration of an image forming apparatus.

An image forming apparatus 1 is connected to PCs 3 and 4 via a localarea network (LAN) 400.

The image forming apparatus 1 includes a reader unit 2, a printer unit6, an operation unit 7, a hard disk 8, a facsimile (fax) unit 90, and acontroller unit 110.

The reader unit 2 reads a document (a sheet) to input image data. Thereader unit 2 includes an optional document feeding unit 10 and ascanner unit 11. The optional document feeding unit 10 conveys thedocument. The optional document feeding unit 10 is configured such thatthe optional document feeding unit 10 is attachable to the reader unit2. The scanner unit 11 optically reads the conveyed document to convertthe document into image data in the form of electrical signals.

The printer unit 6 executes printing on a sheet based on the image data.The printer unit 6 includes a sheet feeding unit 12, a marking unit 13,and a sheet discharging unit 14. The sheet feeding unit 12 includes aplurality of sheet cassettes for storing recording sheets (sheets). Themarking unit 13 transfers and fixes the image data onto a recordingsheet. The sheet discharging unit 14 executes sorting processing andstapling processing on the printed recording sheet and then dischargesthe printed recording sheet to the outside. The printer unit 6 isconfigured such that an optional sheet discharging unit 15 and anoptional sheet feeding unit 16 can additionally be connected to theprinter unit 6 afterward to expand functions and can be removed from theprinter unit 6.

The operation unit 7 receives various user's instructions via keys. Theoperation unit 7 also notifies a user of various types of informationvia a panel.

The hard disk 8 stores control programs and image data.

The fax unit 90 executes facsimile input and output processing.

Although the optional document feeding unit 10, the optional sheetdischarging unit 15, and the optional sheet feeding unit 16 aredescribed as optional units, the present exemplary embodiment is notlimited to these optional units. For example, the fax unit may be anoptional unit, or other hardware such as an extended memory may be addedas an optional unit.

The controller unit 110 is connected to components, such as the readerunit 2, the printer unit 6, the operation unit 7, the hard disk 8, andthe fax unit 90, to control each component.

FIG. 2 is a block diagram illustrating a configuration of the controllerunit 110.

The controller unit 110 mainly includes a main board 2200 and asub-board 2220 . The main board 2200 handles ordinary informationprocessing. The sub-board 2220 handles image formation processing. Themain board 2200 and the sub-board 2220 may be formed as a single board.

The main board 2200 includes a boot read only memory (ROM) 2201, acentral processing unit (CPU) 2202, a bus controller 2204, a diskcontroller 2205, a port switch 2206, a port selector 2207, and a flashdisk 2208. The main board 2200 also includes a memory controller 2212, adynamic random access memory (DRAM) 2213, and a bus bridge 2214.

The boot ROM 2201 is a nonvolatile storage medium and stores bootprograms.

The CPU 2202 executes a boot program, an operating system (OS), and anapplication program.

The bus controller 2204 controls transmission and reception of databetween the main board 2200 and the sub-board 2220.

The disk controller 2205 controls the hard disk 8 via the port switch2206 and the port selector 2207.

The port switch 2206 switches on/off access via the port selector 2207in response to a command from the CPU 2202.

The port selector 2207 connects the flash disk 2208 and the hard disk 8together and selects the flash disk 2208 or the hard disk 8 as an accessdestination.

The flash disk 2208 is a nonvolatile storage medium and stores an OS andan application program.

The memory controller 2212 controls the DRAM 2213.

The DRAM 2213 is a volatile storage medium and temporarily stores aprogram and image data to be used by the CPU 2202.

The bus bridge 2214 relays data between the bus controller 2204 and abus controller 2225.

The sub-board 2220 includes a boot ROM 2221, a CPU 2222, a DRAM 2242,and a memory controller 2240.

The boot ROM 2221 is a nonvolatile storage medium and stores a bootprogram.

The CPU 2222 executes a boot program, an OS, and an application program.

The memory controller 2240 controls the DRAM 2242.

The DRAM 2242 is a volatile storage medium and temporarily stores aprogram and image data to be used by the CPU 2222.

An image processor 2224 executes various types of image processing onimage data.

The bus controller 2225 controls transmission and reception of databetween the main board 2200 and the sub-board 2220.

A device controller 2226 controls the reader unit 2, the printer unit 6,and the fax unit 90.

The operation unit 7 is connected to the CPU 2202 via a bus that is notillustrated.

The controller unit 110 includes a network interface controller (NIC),which is not illustrated, in the main board 2200 or in the sub-board2220 to be communicable with the PC3 and the PC4 via the LAN 400.

As to a power supply system, power is supplied to the image formingapparatus 1 from a commercial power source via a rocker switch. Thepower supply system is divided into an primary group including the mainboard 2200 and a secondary group including the sub-board 2220. During asleep state 304, which will be described below, power is supplied to theprimary group while no power is supplied to the secondary group. Whenthe rocker switch is off, the image forming apparatus 1 is in asuspended state 305, which will be described below. In the suspendedstate, power can be supplied only to the DRAM 2213.

FIG. 3 is a state transition diagram illustrating transitions betweenpower states of the image forming apparatus 1.

The image forming apparatus 1 is operable in one of the power states.

The power states of the image forming apparatus 1 include a power-offstate 301, a standby state 302, a job execution state 303, the sleepstate 304, and the suspended state 305.

The power states in descending order of power consumption are asfollows: the job execution state 303>the standby state 302>the sleepstate 304>the suspended state 305>the power-off state 301.

The power-off state 301 (an example of a third power state or power-offstate) refers to a state in which the power switch of the image formingapparatus 1 is off, and the supply of power to every component of theimage forming apparatus 1 is stopped. When a user turns on the powerswitch in the power-off state 301, the image forming apparatus 1 isshifted to the standby state 302.

The standby state 302 (an example of a first power state) refers to astate in which the image forming apparatus 1 is waiting for jobexecution, and power is supplied to every component of the image formingapparatus 1. In the standby state 302, however, it is not necessary tosupply power to every component of the image forming apparatus 1. Powermay be supplied only to essential components but not to the rest of thecomponents (e.g., the operation unit 7). When the image formingapparatus 1 in the standby state 302 receives a job from the PC 3, theimage forming apparatus 1 is shifted to the job execution state 303.When the image forming apparatus 1 in the standby state 302 receives aninstruction to sleep, the image forming apparatus 1 is shifted to thesleep state 304. Examples of the instruction to sleep include pressingof a shift-to-sleep-state button by a user and passing of apredetermined period in the standby state 302. When a user turns off thepower switch in the standby state 302, the necessity of a shutdown isdetermined in step 310. If a shutdown is necessary, then shutdownprocessing is executed to shift the image forming apparatus 1 to thepower-off state 301. If a shutdown is not necessary, then suspendingprocessing is executed to shift the image forming apparatus 1 to thesuspended state 305. The shutdown processing refers to processing inwhich an OS and an application are terminated to terminate the imageforming apparatus 1. The suspending processing refers to processing inwhich the image forming apparatus 1 is suspended while the supply ofpower to the DRAM 2213 is continued to retain memory images (includinginformation on the state of the image forming apparatus 1) stored in theDRAM 2213. The suspended state 305 refers to a state in which the imageforming apparatus 1 is paused, and the supply of power to the DRAM 2213is continued to retain information on the state of the image formingapparatus 1 stored in the DRAM 2213. Instead of the suspendingprocessing, hibernation processing (pause processing in which datastored in the DRAM 2213 is saved in the hard disk 8, the supply of powerto the DRAM 2213 is stopped, and the image forming apparatus 1 ispaused) may be employed. In the hibernation, a nonvolatile storagemedium other than the hard disk 8 may be used. The hibernationprocessing refers to processing in which memory images (including thestate of the image forming apparatus 1) stored in the DRAM 2213 aresaved in the hard disk 8 to retain the memory images and the imageforming apparatus 1 is paused. A hibernation state refers to a state inwhich the image forming apparatus 1 is paused. In the hibernation state,although the supply of power to the hard disk 8 is stopped, since thehard disk 8 is a nonvolatile storage medium, the state of the imageforming apparatus 1 stored in the hard disk 8 is retained. Determinationof the necessity of a shutdown will be described below. A target of thesuspending processing (a non-volatile memory for which the supply ofpower is continued to retain data during the suspended state 305) mayinclude not only the DRAM 2213 but also the DRAM 2242. Alternatively,only the DRAM 2213 may be the target of the suspending processing, anddata stored in the DRAM 2242 may be saved in the DRAM 2213.

The job execution state 303 refers to a state in which the image formingapparatus 1 is executing a job, and power is supplied to every componentof the image forming apparatus 1. Even in the job execution state 303,however, it is not always necessary to supply power to every componentof the image forming apparatus 1. Power may be supplied only toessential components but not to the rest of the components (e.g., theoperation unit 7). When the image forming apparatus 1 in the jobexecution state 303 completes the job, the image forming apparatus 1 isshifted to the standby state 302.

The sleep state 304 refers to a state in which the image formingapparatus 1 is standing by under a power saving condition. In the sleepstate 304, while power is supplied to the controller unit 110 among thecomponents of the image forming apparatus 1, the supply of power to thereader unit 2, the printer unit 6, and the operation unit 7 is stopped.When the image forming apparatus 1 in the sleep state 304 receives areturn-from-sleep-state factor, the image forming apparatus 1 is shiftedto the standby state 302. Examples of the return-from-sleep-state factorinclude pressing of a return-from-sleep-state button of the operationunit 7 by a user and reception of a job from the PC 3. The power statesof the image forming apparatus 1 may further include a deep sleep state,which is not illustrated. The deep sleep state refers to a state inwhich predetermined conditions are satisfied in the sleep state 304. Thedeep sleep state is different from the sleep state 304 in components ofthe controller unit 110 to which power is supplied. For example, thesupply of power to the sub-board 2220 is stopped in the deep sleepstate. The deep sleep state is also different from the suspended state305 in components of the controller unit 110 to which power is supplied.For example, the supply of power to the network interface, which is notillustrated, is continued in the deep sleep state.

The suspended state 305 (an example of a second power state orpower-saving state) refers to a state in which the image formingapparatus 1 is standing by to be ready for high-speed activation. In thesuspended state 305, power is supplied to the DRAM 2213 among thecomponents of the image forming apparatus 1, and the supply of power tothe rest of the components is stopped. When a user turns on the powerswitch in the suspended state 305, resume processing is executed toshift the image forming apparatus 1 to the standby state 302. The resumeprocessing refers to processing to return the image forming apparatus 1to a former state of the image forming apparatus 1 before beingsuspended by use of information stored in the DRAM 2213 in thesuspending processing (information having been stored in the DRAM 2213that is saved in the hard disk 8 in the hibernation processing).

When a user turns on the power switch, the CPU 2202 determines whetherthe image forming apparatus 1 is waking up from the power-off state 301or from the suspended state 305 (or the hibernation state). If the imageforming apparatus 1 is waking up from the power-off state 301, then theCPU 2202 executes normal activation processing. If the image formingapparatus 1 is waking up from the suspended state 305 (or thehibernation state), then the CPU 2202 executes the resume processing.

FIG. 4 is a flow chart illustrating an operation at the time when thepower switch of the image forming apparatus 1 is turned on. The CPU 2202reads a program stored in the hard disk 8 or in the boot ROM 2201 intothe DRAM 2213 to execute the program, so that the operation is realized.

In step S101, the CPU 2202 detects a user's operation to turn on thepower switch.

In step S102, the CPU 2202 determines whether the image formingapparatus 1 is activated from the power-off state 301. Specifically, theCPU 2202 accesses the hard disk 8 or the DRAM 2213. If the hard disk 8or the DRAM 2213 does not store information indicating that the imageforming apparatus 1 has been in the suspended state 305 (or thehibernation state), then the CPU 2202 determines that the image formingapparatus 1 is to be activated from the power-off state 301. If the harddisk 8 or the DRAM 2213 stores information indicating that the imageforming apparatus 1 has been in the suspended state 305 (or thehibernation state), then the CPU 2202 determines that the image formingapparatus 1 is not to be activated from the power-off state 301. If YESin step S102, then the processing proceeds to step S103. If NO in stepS102, then the processing proceeds to step S104.

In step S103, the CPU 2202 executes activation processing from thepower-off state 301. Details of the activation processing will bedescribed below with reference to FIG. 5.

In step S104, the CPU 2202 executes activation processing from thesuspended state 305 (or the hibernation state) . Details of theactivation processing will be described below with reference to FIG. 6.

FIG. 5 is a flow chart illustrating the activation processing from thepower-off state 301. The activation processing describes details of stepS103 illustrated in FIG. 4. The CPU 2202 reads a program stored in thehard disk 8 or the boot ROM 2201 into the DRAM 2213 to execute theprogram, so that the activation processing is realized.

In step S201, the CPU 2202 activates an OS to enable the CPU 2202 andthe CPU 2222 to execute various controls.

In step S202, the CPU 2202 executes initialization processing via theCPU 2222 to initialize the reader unit 2 including the optional deviceand the printer unit 6 including the optional devices. In theinitialization processing, the reader unit 2 determines whether theoptional document feeding unit 10 is connected to the reader unit 2. Ifthe optional document feeding unit 10 is connected to the reader unit 2,then the reader unit 2 notifies the controller unit 110 of necessarycontrol information including the model name, detailed configurationinformation, and operation speed of the detected optional documentfeeding unit 10. Similarly, the printer unit 6 determines whether theoptional sheet discharging unit 15 and the optional sheet feeding unit16 are connected to the printer unit 6, collects detailed information,and notifies the controller unit 110 of the information. The CPU 2202initializes each device and the controller unit 110 based on theconfiguration information notified by the reader unit 2 and the printerunit 6.

In step S203, the CPU 2202 shifts the power state of the image formingapparatus 1 to the standby state 302.

FIG. 6 is a flow chart illustrating the activation processing from thesuspended state 305 (or the hibernation state). The activationprocessing describes details of step S104 illustrated in FIG. 4. The CPU2202 reads a program stored in the hard disk 8 or the boot ROM 2201 intothe DRAM 2213 to execute the program, so that the activation processingis realized.

In step S301, the CPU 2202 reads optional device configurationinformation on the optional devices before the shift to the suspendedstate 305 (or the hibernation state), which is stored in the DRAM 2213or the hard disk 8. The optional device configuration information refersto information indicating details of each optional device. Specificexamples include a media access control (MAC) address, serial number,type of device, name of manufacturer, name of series, and name of modelof each device. Storage of optional device configuration information inthe DRAM 2213 will be described in step S602 illustrated in FIG. 9.

In step S302, the CPU 2202 acquires current optional deviceconfiguration information (optional device configuration informationafter the return from the suspended state 305) from each optional unitvia the CPU 2222 (an example of a second acquisition unit).

In step S303, the CPU 2202 compares the optional device configurationinformation read in step S301 with the optional device configurationinformation acquired in step S302 to determine whether there has beenany change in the optional device configuration during the suspendedstate 305 (or the hibernation state). Specifically, if the optionaldevice configuration information read in step S301 is consistent withthe optional device configuration information acquired instep S302, thenthe CPU 2202 determines that there has been no change in the optionaldevice configuration during the suspended state 305 (or the hibernationstate). If the optional device configuration information read in stepS301 is inconsistent with the optional device configuration informationacquired in step S302, then the CPU 2202 determines that there has beena change in the optional device configuration during the suspended state305 (or the hibernation state). If NO in step S303, then the processingproceeds to step S304. If YES in step S303, then the processing proceedsto step S306.

In step S304, the CPU 2202 executes the resume processing.

In step S305, the CPU 2202 shifts the power state of the image formingapparatus 1 to the standby state 302.

In step S306, the CPU 2202 stores in the hard disk 8 or the DRAM 2213information indicating that shifting to the suspended state 305 (or thehibernation state) is prohibited when a user turns off the power switchnext time. Accordingly, regardless of the specification setting for thetime when the power switch is turned off, the image forming apparatus 1is shifted to the power-off state 301 when a user turns off the powerswitch in response to the notification given in step S307. Thus, theimage forming apparatus 1 can be restarted as appropriate. Theinformation may be invalidated when the image forming apparatus 1 isshifted to the power-off state 301 next time or when a predeterminedperiod has elapsed.

In step S307, the CPU 2202 displays a notification on a display screenof the operation unit 7 to prompt the user to restart the image formingapparatus 1.

Accordingly, even when the CPU 2202 executes the activation from thesuspended state 305, the CPU 2202 may not load the image stored in theDRAM to execute the resume processing at once depending on the status ofeach optional unit. This enables the image forming apparatus 1 torespond to a change in the configuration of the optional units that hasbeen made during the suspended state 305.

FIG. 7 is a flow chart illustrating an operation at the time when thepower switch of the image forming apparatus 1 is turned off. The CPU2202 reads a program stored in the hard disk 8 or the boot ROM 2201 intothe DRAM 2213 to execute the program, so that the operation is realized.

In step S401, the CPU 2202 detects a user's operation to turn off thepower switch.

In step S402, the CPU 2202 determines whether the image formingapparatus 1 is to be shifted to the power-off state 301. Specifically,if the specification setting is set such that the image formingapparatus 1 is to be shifted to the power-off state 301 when the powerswitch of the image forming apparatus 1 is turned off, then the CPU 2202determines that the image forming apparatus 1 is to be shifted to thepower-off state 301. If the specification setting is set such that theimage forming apparatus 1 is to be shifted to the suspended state 305(or the hibernation state) when the power switch of the image formingapparatus 1 is turned off, then the CPU 2202 determines that the imageforming apparatus 1 is not to be shifted to the power-off state 301.Even if the image forming apparatus 1 is set to be shifted to thesuspended state 305 (or the hibernation state), the CPU 2202 accessesthe hard disk 8 or the DRAM 2213 to perform control as follows. Ifneither the hard disk 8 nor the DRAM 2213 stores the information storedin step S306, then the CPU 2202 determines that the image formingapparatus 1 is not to be shifted to the power-off state 301. If the harddisk 8 or the DRAM 2213 stores the information stored in step S306, thenthe CPU 2202 determines that the image forming apparatus 1 is to beshifted to the power-off state 301. If YES in step S402, then theprocessing proceeds to step S403. If NO in step S403, then theprocessing proceeds to step S404.

In step S403, the CPU 2202 executes shift processing to the power-offstate 301. Details of the shift processing will be described below withreference to FIG. 8.

In step S404, the CPU 2202 executes shift processing to the suspendedstate 305 (or the hibernation state). Details of the shift processingwill be described below with reference to FIG. 9.

FIG. 8 is a flow chart illustrating the shift processing to thepower-off state 301. The shift processing describes details of step S403illustrated in FIG. 7. The CPU 2202 reads a program stored in the harddisk 8 or the boot ROM 2201 into the DRAM 2213 to execute the program,so that the shift processing is realized.

In step S501, the CPU 2202 terminates the OS. This is shutdownprocessing.

In step S502, the CPU 2202 shifts the power state of the image formingapparatus 1 to the power-off state 301.

FIG. 9 is a flow chart illustrating the shift processing to thesuspended state 305 (or the hibernation state). The shift processingdescribes details of step S404 illustrated in FIG. 7. The CPU 2202 readsa program stored in the hard disk 8 or the boot ROM 2201 into the DRAM2213 to execute the program, so that the shift processing is realized.

In step S601, the CPU 2202 acquires current optional deviceconfiguration information (optional device configuration informationbefore the shift to the suspended state 305) from each optional unit viathe CPU 2222 (an example of a first acquisition unit).

In step S602, the CPU 2202 stores in the DRAM 2213 or the hard disk 8the optional device configuration information (optional deviceconfiguration information before the shift to the suspended state 305)acquired in step S601.

In step S603, the CPU 2202 shifts the power state of the image formingapparatus 1 to the suspended state 305 (or the hibernation state). Atthis time, the CPU 2202 accesses the hard disk 8 or the DRAM 2213 tostore information for use in the next activation that indicates that theformer state is the suspended state 305 (or the hibernation state).

Although the foregoing describes that mainly a single CPU (the CPU 2202)executes processing, a plurality of CPUs may share execution of theprocessing.

According to the present exemplary embodiment, an optional device can becontrolled as appropriate even when the optional device is installed orremoved during the suspended state 305 (or the hibernation state).Furthermore, when neither installation nor removal of an optional devicehas been performed, the image forming apparatus 1 is resumed from thestandby state 302 to enable high-speed activation.

Aspects of the present invention can also be realized by a computer of asystem or apparatus (or devices such as a CPU or MPU) that reads out andexecutes a program recorded on a memory device to perform the functionsof the above-described embodiment (s) , and by a method, the steps ofwhich are performed by a computer of a system or apparatus by, forexample, reading out and executing a program recorded on a memory deviceto perform the functions of the above-described embodiment(s). For thispurpose, the program is provided to the computer for example via anetwork or from a recording medium of various types serving as thememory device (e.g., computer-readable medium).

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all such modifications and equivalent structures andfunctions.

What is claimed is:
 1. An information processing apparatus to which anexternal device is attachable, the information processing apparatuscomprising: an initialization unit configured to, when the informationprocessing apparatus is activated from a power-off state, executeinitialization of the external device, and not to, when the informationprocessing apparatus is returned from a power-saving state, execute theinitialization of the external device; a first acquisition unitconfigured to acquire information on the external device from theexternal device when the information processing apparatus is shifted tothe power-saving state; a storage unit configured to store theinformation acquired by the first acquisition unit; a second acquisitionunit configured to acquire information on the external device from theexternal device when the information processing apparatus is returnedfrom the power-saving state; and a control unit configured not to, whenthe information processing apparatus is returned from the power-savingstate, in a case where the information stored in the storage unit isconsistent with the information acquired by the second acquisition unit,control the initialization unit to execute the initialization of theexternal device, and to, in a case where the information stored in thestorage unit is inconsistent with the information acquired by the secondacquisition unit, control the initialization unit to execute theinitialization of the external device.